# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=perl-http-message
_pkgreal=HTTP-Message
_author=OALDERS
_au=${_author%%"${_author#??}"}
_a=${_author%%"${_author#?}"}
pkgver=6.45
pkgrel=0
pkgdesc="HTTP style message"
url="https://metacpan.org/release/HTTP-Message"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-clone>=0.46 perl-http-date perl-uri perl-io-html perl-encode-locale perl-lwp-mediatypes"
checkdepends="perl-try-tiny perl-test-needs"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/HTTP-Message-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	default_prepare
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
b72ab9068c5f9ddb41f89b2a84887393f2c1bd14b462a1a60c03b4560800cfbf37c76f4bdd7c08f1ce9bf616242c2e39e0ff93859ed61268c48c978322a6d03d  HTTP-Message-6.45.tar.gz
"
